<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arr1 = [11, 12, 13];
    var arr2 = [21, 22, 23];
    // 修改数组 arr1 的 length
    arr1.length = 1;
    console.log(JSON.stringify(arr1));
    // 修改数组 arr2 的 length
    arr2.length = 5;
    console.log(JSON.stringify(arr2));
</script>
</body>
</html>